/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JPanel;

/**
 *
 * @author Tin Pham
 */
public class ImageManager extends JPanel{
    protected List<Image> images;
   
    
    public ImageManager() {
        images = new ArrayList<Image>();
    }
    
    public void add(Image e) {
        super.add(e);
        images.add(e);
    }
    
    public void add(String path ,int x, int y, int width, int height) {
        Image e = new Image(path, x, y, width, height);
        images.add(e);
        super.add(e);
    }
    
    public void removeAll() {
        images.removeAll(images);
    }
    
}

